<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/util.tld" prefix="myutil" %>
<!DOCTYPE HTML>
<html>
  <head>
    <title>商品类别管理</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<link href = "/ecp/resources/css/default/base.css" rel = "stylesheet" type = "text/css"/>
    <script type="text/javascript" src="/ecp/resources/js/jquery-1.8.1.js"></script>
    <script type="text/javascript" src="/ecp/resources/js/tydic.js"></script>
    <script type="text/javascript" src="/ecp/resources/js/public.js"></script>
    <script type = "text/javascript">
         jQuery(function($) {
			dicPath = '/ecp/resources/css/default/images/';
		});
		
		function update(){
		   submitForm("updategoodform","/ecp/backstage/goods/updatetypePage.do");
		}
	</script>
	
	<script charset="utf-8" src="/ecp/editor/kindeditor-min.js"></script>
    <script charset="utf-8" src="/ecp/editor/lang/zh_CN.js"></script>
	<script>
	      KindEditor.ready(function(K) {
	        window.editor = K.create('');

	           var editor = K.editor({
	                uploadJson : '/ecp/backstage/goods/html/upload.do',
                    fileManagerJson : '/ecp/backstage/goods/html/fileManager.do',
					allowFileManager : true
				});
				K('#image1').click(function() {
					editor.loadPlugin('image', function() {
						editor.plugin.imageDialog({
							imageUrl : K('#logo').val(),
							clickFn : function(url, title, width, height, border, align) {
								K('#logo').val(url);
								editor.hideDialog();
							}
						});
					});
				});
	        });
	      
	</script>
  </head>
  
  <body>
      <myutil:munuPaht menueId='${param.menuId}' optName="商品类别修改"/>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td class="ico21">
					&nbsp;
				</td>
				<td class="tb">
					商品类别修改
				</td>
				<td class="ico4">
					&nbsp;
				</td>
			</tr>
		</table>
		<form id="updategoodform">
        <table width="100%" border="0" cellpadding="0" cellspacing="0"
				class="formTable ">
				<tbody>
				    <tr>
						<th width="15%">
							类别名称：
						</th>
						<td width="35%">
						     <input type="hidden" class="input120" name="id" value="${param.id}"  />
							 <input type="text" class="input120" name="name" value="${vo.name}"  />
						</td>
						<th width="15%">
						         类别描述：
						</th>
						<td width="35%">
						   <input type="text" class="input120" name="desc" value="${vo.desc}"  />
						</td>
					</tr>
					<tr>
						<th width="15%">
							类别LOGO：
						</th>
						<td width="35%">
							<input type="text" id="logo" class="input120" name="logo" value="${vo.logo}"  />
							<input type="button" id="image1" value="选择图片" />
						</td>
						<th width="15%">
							父类别：
						</th>
						<td width="35%">
							  <select name = "pid" size = "1" class = "input120">
							    <option value="-1">顶级类别</option>
                                <c:forEach items="${list}" var="goodtype">
                                   <option   <c:if test="${vo.id}==${goodtype['id']}">selected='selected'</c:if>  value="${goodtype['id']}">${goodtype['name']}</option>
                                </c:forEach>
                            </select>
						</td>
					</tr>
				</tbody>
			</table>
			</form>
			<table width="100%" border="0" cellspacing="0" cellpadding="0"
				class="mT5">
				<tr>
					<td height="30" align="center">
						<input name="btnSave" id="btnSave" type="button" class="btn1" value="提交"
							onClick="update();">
						<input type="button" value="返回" class="btn1" onclick="history.go(-1);"/>
					</td>
				</tr>
			</table>
      
  </body>
</html>